import request from '@/service';
import { IRequest } from '@/service/type';

enum DashBoardApi {
  cateGoodsCount = '/goods/category/count',
  cateGoodsSale = '/goods/category/sale',
  addressGoodsSale = '/goods/address/sale',
  cateGoodsFavor = '/goods/category/favor',
}

export const getCategoryGoodsCount = function () {
  return request.get<IRequest>({
    url: DashBoardApi.cateGoodsCount,
  });
};

export const getCategoryGoodsSale = function () {
  return request.get<IRequest>({
    url: DashBoardApi.cateGoodsSale,
  });
};

export const getCategoryGoodsFavor = function () {
  return request.get<IRequest>({
    url: DashBoardApi.cateGoodsFavor,
  });
};

export const getAddressGoodsSale = function () {
  return request.get<IRequest>({
    url: DashBoardApi.addressGoodsSale,
  });
};
